package com.xie.service;

import com.xie.dao.TaskMapper;
import com.xie.pojo.Task;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TaskServiceImpl implements TaskService {

    private TaskMapper taskMapper;
    public void setTaskMapper(TaskMapper taskMapper) {
        this.taskMapper = taskMapper;
    }

    public int addTask(Task task) {
        return taskMapper.addTask(task);
    }

    public List<Task> queryAllTask() {
        return taskMapper.queryAllTask();
    }

    public int deleteTask(int task_id) {
        return taskMapper.deleteTask(task_id);
    }

    public int updateTask(Task task) {
        return taskMapper.updateTask(task);
    }

    public Task queryTask(int task_id) {
        return taskMapper.queryTask(task_id);
    }
}
